<div class="col-12 mb-3">
    <div>
        <button type="button" class="btn btn-link" wire:click="show">
            Добавить
        </button>
    </div>
    <div @class(['modal fade bg-black bg-opacity-25','show' => $show]) data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
         aria-labelledby="addLinkModalTitle" aria-hidden="true" style="display: @if($show === true) block  @else none @endif">
        <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content">
                <div class="modal-header">
                    <h1 class="modal-title fs-5" id="addLinkModalTitle">Добавление ссылки</h1>
                    <button type="button" class="btn-close" aria-label="Close" wire:click="hide"></button>
                </div>
                <div class="modal-body">
                    <form>
                        <div class="mb-3">
                            <label for="name" class="form-label">Имя ссылки</label>
                            <input type="text" class="form-control @error('name') is-invalid @enderror" id="name" wire:model="name">
                            @error('name') <div id="passwordFeedback" class="invalid-feedback">{{ $message }}</div>@enderror
                        </div>
                        <div class="mb-3">
                            <label for="url" class="form-label">Ссылка</label>
                            <input type="url" class="form-control @error('url') is-invalid @enderror" id="url" wire:model="url">
                            @error('url') <div id="passwordFeedback" class="invalid-feedback">{{ $message }}</div>@enderror
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" wire:click="hide">Отмена</button>
                    <button type="button" class="btn btn-primary" wire:click="addLink">Сохранить</button>
                </div>
            </div>
        </div>
    </div>
</div>
